{"ast":null,"code":"var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport useFlexGapSupport from '../_util/hooks/useFlexGapSupport';\nimport Item from './Item';\nimport Compact from './Compact';\nimport useStyle from './style';\nexport const SpaceContext = /*#__PURE__*/React.createContext({\n  latestIndex: 0,\n  horizontalSize: 0,\n  verticalSize: 0,\n  supportFlexGap: false\n});\nconst spaceSize = {\n  small: 8,\n  middle: 16,\n  large: 24\n};\nfunction getNumberSize(size) {\n  return typeof size === 'string' ? spaceSize[size] : size || 0;\n}\nconst Space = props => {\n  const {\n    getPrefixCls,\n    space,\n    direction: directionConfig\n  } = React.useContext(ConfigContext);\n  const {\n      size = (space === null || space === void 0 ? void 0 : space.size) || 'small',\n      align,\n      className,\n      children,\n      direction = 'horizontal',\n      prefixCls: customizePrefixCls,\n      split,\n      style,\n      wrap = false\n    } = props,\n    otherProps = __rest(props, [\"size\", \"align\", \"className\", \"children\", \"direction\", \"prefixCls\", \"split\", \"style\", \"wrap\"]);\n  const supportFlexGap = useFlexGapSupport();\n  const [horizontalSize, verticalSize] = React.useMemo(() => (Array.isArray(size) ? size : [size, size]).map(item => getNumberSize(item)), [size]);\n  const childNodes = toArray(children, {\n    keepEmpty: true\n  });\n  const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align;\n  const prefixCls = getPrefixCls('space', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const cn = classNames(prefixCls, hashId, `${prefixCls}-${direction}`, {\n    [`${prefixCls}-rtl`]: directionConfig === 'rtl',\n    [`${prefixCls}-align-${mergedAlign}`]: mergedAlign\n  }, className);\n  const itemClassName = `${prefixCls}-item`;\n  const marginDirection = directionConfig === 'rtl' ? 'marginLeft' : 'marginRight';\n  // Calculate latest one\n  let latestIndex = 0;\n  const nodes = childNodes.map((child, i) => {\n    if (child !== null && child !== undefined) {\n      latestIndex = i;\n    }\n    const key = child && child.key || `${itemClassName}-${i}`;\n    return /*#__PURE__*/React.createElement(Item, {\n      className: itemClassName,\n      key: key,\n      direction: direction,\n      index: i,\n      marginDirection: marginDirection,\n      split: split,\n      wrap: wrap\n    }, child);\n  });\n  const spaceContext = React.useMemo(() => ({\n    horizontalSize,\n    verticalSize,\n    latestIndex,\n    supportFlexGap\n  }), [horizontalSize, verticalSize, latestIndex, supportFlexGap]);\n  // =========================== Render ===========================\n  if (childNodes.length === 0) {\n    return null;\n  }\n  const gapStyle = {};\n  if (wrap) {\n    gapStyle.flexWrap = 'wrap';\n    // Patch for gap not support\n    if (!supportFlexGap) {\n      gapStyle.marginBottom = -verticalSize;\n    }\n  }\n  if (supportFlexGap) {\n    gapStyle.columnGap = horizontalSize;\n    gapStyle.rowGap = verticalSize;\n  }\n  return wrapSSR( /*#__PURE__*/React.createElement(\"div\", Object.assign({\n    className: cn,\n    style: Object.assign(Object.assign({}, gapStyle), style)\n  }, otherProps), /*#__PURE__*/React.createElement(SpaceContext.Provider, {\n    value: spaceContext\n  }, nodes)));\n};\nconst CompoundedSpace = Space;\nCompoundedSpace.Compact = Compact;\nexport default CompoundedSpace;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","classNames","toArray","React","ConfigContext","useFlexGapSupport","Item","Compact","useStyle","SpaceContext","createContext","latestIndex","horizontalSize","verticalSize","supportFlexGap","spaceSize","small","middle","large","getNumberSize","size","Space","props","getPrefixCls","space","direction","directionConfig","useContext","align","className","children","prefixCls","customizePrefixCls","split","style","wrap","otherProps","useMemo","Array","isArray","map","item","childNodes","keepEmpty","mergedAlign","undefined","wrapSSR","hashId","cn","itemClassName","marginDirection","nodes","child","key","createElement","index","spaceContext","gapStyle","flexWrap","marginBottom","columnGap","rowGap","assign","Provider","value","CompoundedSpace"],"sources":["/data/messenger.client/node_modules/antd/es/space/index.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport useFlexGapSupport from '../_util/hooks/useFlexGapSupport';\nimport Item from './Item';\nimport Compact from './Compact';\nimport useStyle from './style';\nexport const SpaceContext = /*#__PURE__*/React.createContext({\n  latestIndex: 0,\n  horizontalSize: 0,\n  verticalSize: 0,\n  supportFlexGap: false\n});\nconst spaceSize = {\n  small: 8,\n  middle: 16,\n  large: 24\n};\nfunction getNumberSize(size) {\n  return typeof size === 'string' ? spaceSize[size] : size || 0;\n}\nconst Space = props => {\n  const {\n    getPrefixCls,\n    space,\n    direction: directionConfig\n  } = React.useContext(ConfigContext);\n  const {\n      size = (space === null || space === void 0 ? void 0 : space.size) || 'small',\n      align,\n      className,\n      children,\n      direction = 'horizontal',\n      prefixCls: customizePrefixCls,\n      split,\n      style,\n      wrap = false\n    } = props,\n    otherProps = __rest(props, [\"size\", \"align\", \"className\", \"children\", \"direction\", \"prefixCls\", \"split\", \"style\", \"wrap\"]);\n  const supportFlexGap = useFlexGapSupport();\n  const [horizontalSize, verticalSize] = React.useMemo(() => (Array.isArray(size) ? size : [size, size]).map(item => getNumberSize(item)), [size]);\n  const childNodes = toArray(children, {\n    keepEmpty: true\n  });\n  const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align;\n  const prefixCls = getPrefixCls('space', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const cn = classNames(prefixCls, hashId, `${prefixCls}-${direction}`, {\n    [`${prefixCls}-rtl`]: directionConfig === 'rtl',\n    [`${prefixCls}-align-${mergedAlign}`]: mergedAlign\n  }, className);\n  const itemClassName = `${prefixCls}-item`;\n  const marginDirection = directionConfig === 'rtl' ? 'marginLeft' : 'marginRight';\n  // Calculate latest one\n  let latestIndex = 0;\n  const nodes = childNodes.map((child, i) => {\n    if (child !== null && child !== undefined) {\n      latestIndex = i;\n    }\n    const key = child && child.key || `${itemClassName}-${i}`;\n    return /*#__PURE__*/React.createElement(Item, {\n      className: itemClassName,\n      key: key,\n      direction: direction,\n      index: i,\n      marginDirection: marginDirection,\n      split: split,\n      wrap: wrap\n    }, child);\n  });\n  const spaceContext = React.useMemo(() => ({\n    horizontalSize,\n    verticalSize,\n    latestIndex,\n    supportFlexGap\n  }), [horizontalSize, verticalSize, latestIndex, supportFlexGap]);\n  // =========================== Render ===========================\n  if (childNodes.length === 0) {\n    return null;\n  }\n  const gapStyle = {};\n  if (wrap) {\n    gapStyle.flexWrap = 'wrap';\n    // Patch for gap not support\n    if (!supportFlexGap) {\n      gapStyle.marginBottom = -verticalSize;\n    }\n  }\n  if (supportFlexGap) {\n    gapStyle.columnGap = horizontalSize;\n    gapStyle.rowGap = verticalSize;\n  }\n  return wrapSSR( /*#__PURE__*/React.createElement(\"div\", Object.assign({\n    className: cn,\n    style: Object.assign(Object.assign({}, gapStyle), style)\n  }, otherProps), /*#__PURE__*/React.createElement(SpaceContext.Provider, {\n    value: spaceContext\n  }, nodes)));\n};\nconst CompoundedSpace = Space;\nCompoundedSpace.Compact = Compact;\nexport default CompoundedSpace;"],"mappings":"A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